import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import '@/assets/css/code-block.less'
import { ErrorHandler } from './utils/errorHandler'
const app = createApp(App)
// 设置全局错误处理
app.config.errorHandler = (error) => {
    ErrorHandler.handleGlobalError(error)
}

// 设置路由错误处理
router.onError((error) => {
    ErrorHandler.handleRouteError(error)
})

app.use(store).use(router).mount('#app')

